package com.changanw.account.mapper;

import com.changanw.account.model.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface AccountMapper {

    @Select("select * from account_tbl where userId = #{userId}")
    Account getAccountByUserId(String userId);

    @Update("update account_tbl set money = #{money},freezeMoney = #{freezeMoney}" +
            " where userId = #{userId}")
    Integer updateAccount(Account account);
}
